package com.ruoyi.banner.service.Impl;

import com.ruoyi.banner.domain.Banner;
import com.ruoyi.banner.mapper.BannerMapper;
import com.ruoyi.banner.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BannerServcieImpl implements BannerService {

    @Autowired
    BannerMapper mapper;

    @Override
    public List<Banner> getBannerList() {
        return mapper.queryAll();
    }

    @Override
    public int addBanner(Banner banner) {
        return mapper.addBanner(banner);
    }

    @Override
    public List<Banner> queryBannerByname(String pic) {
        return mapper.queryBannerByname(pic);
    }

    @Override
    public void updateBanner(Banner banner) {
        mapper.updateBanner(banner);
    }

    @Override
    public void deleteBanner(int id) {
        mapper.deleteBanner(id);
    }

    @Override
    public int deleteResShopById(Long id) {
        return 0;
    }
}
